home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Info 1994 March
/
Internet Info CD-ROM (Walnut Creek) (March 1994).iso
/
networking
/
ip
/
ka9q
/
alpha.arc
/
8530.C
< prev
next >
Wrap
C/C++ Source or Header
|
1988-07-11
|
701b
|
37 lines
/* Routines generic to all interfaces with 8530s */
#include "global.h"
#include "8530.h"
/* Write 8530 register */
void
write_scc(ctl,reg,val)
register int16 ctl;
int16 reg,val;
{
char i_state;
i_state = disable();
/* Select register; note that point high is also written */
if(reg != R0)
outportb(ctl,(char)(NULLCODE|reg));
outportb(ctl,(char)val);
restore(i_state);
}
/* Read 8530 register */
char
read_scc(ctl,reg)
register int16 ctl;
char reg;
{
char c,i_state;
i_state = disable();
/* Select register; note that point high is also written */
if(reg != R0)
outportb(ctl,(char)NULLCODE|reg);
c = inportb(ctl);
restore(i_state);
return c;
}